/*
 * OrderAgentPushProcess.java
 * business
 *
 * Created by ChenTao on 2016/10/31.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.push.process;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import com.yidiandao.business.constant.Intents;
import com.yidiandao.business.data.bean.Message;
import com.yidiandao.business.data.push.AbsPushProcess;
import com.yidiandao.business.ui.agents.AgentsActivity;

/**
 * 代理商订单
 */
public class OrderAgentPushProcess extends AbsPushProcess {

    public OrderAgentPushProcess(Context context, Message message, boolean isForeground) {
        super(context, message, isForeground);
    }

    @Override
    public Intent getClickNotificationJumpActivityIntent() {
        return new Intent(mContext, AgentsActivity.class);
    }

    @Override
    protected void addExtraDataToNotificationClickReceiverIntent(Intent intent) {
        // 添加跳转到代理商页面的额外的数据信息
        intent.putExtra(Intents.EXTRA_TO_AGENT_ORDER_FRAGMENT, true);
    }

    @Override
    public void onDialogEnsureButtonClick(Message message) {
        // 去到代理商配送订单页面
        tellServerMessageHasRead(message.getMsgId());
        AgentsActivity.actionStart((Activity) mContext, true);
    }
}
